import request from '@/utils/request'

// 查询包装称重列表
export function listPackage(query) {
  return request({
    url: '/packageWeighing/package/list',
    method: 'get',
    params: query
  })
}

// 查询包装称重详细
export function getPackage(bicycleId) {
  return request({
    url: '/packageWeighing/package/' + bicycleId,
    method: 'get'
  })
}

// 新增包装称重
export function addPackage(data) {
  return request({
    url: '/packageWeighing/package',
    method: 'post',
    data: data
  })
}

// 修改包装称重
export function updatePackage(data) {
  return request({
    url: '/packageWeighing/package',
    method: 'put',
    data: data
  })
}

// 删除包装称重
export function delPackage(bicycleId) {
  return request({
    url: '/packageWeighing/package/' + bicycleId,
    method: 'delete'
  })
}

//查找车辆ID具体数据
export function listBicycle(query) {
  return request({
    url: '/packageWeighing/package/bicycle/list',
    method: 'get',
    params: query
  })
}
//查询车辆ID状态
export function selectStatus(bicycleId) {
  return request({
    url: '/packageWeighing/package/selectStatus/' + bicycleId,
    method: 'get'
  })
}
//审核
export function updateAudit(bicycleIds) {
  return request({
    url: '/packageWeighing/package/audit/' + bicycleIds,
    method: 'put',
  })
}
//反审核
export function updateUnAudit(bicycleIds) {
  return request({
    url: '/packageWeighing/package/unaudit/' + bicycleIds,
    method: 'put',
  })
}
